package com.yupi.usercenter.feign.open;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.usercenter.base.model.BaseFeignConstant;
import com.yupi.usercenter.base.model.Result;
import com.yupi.usercenter.model.dto.*;
import com.yupi.usercenter.model.vo.MonitorWoDetailVO;
import com.yupi.usercenter.model.vo.MonitorWoExcelVO;
import com.yupi.usercenter.model.vo.MonitorWoPageVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;


/**
 * 云路供应链科技有限公司 版权所有 © Copyright 2020
 * <p>
 * 监控工单表 FeignClient
 *
 * @author jiweiyu
 * @version 1.0.0
 * @date Created in 2021-03-05
 */
@FeignClient(name = "ylqcapi", path = BaseFeignConstant.PREFIX + "/monitorWo")
public interface MonitorWoFeignClient {

    //(value = "分页查询")
    @PostMapping("/page")
    Result<Page<MonitorWoPageVO>> page(@Valid @RequestBody MonitorWoPageDTO dto);

    //(value = "查询详情")
    @PostMapping("/detail")
    Result<MonitorWoDetailVO> detail(@Valid @RequestBody MonitorWoDetailDTO dto);

    //(value = "新增")
    @PostMapping("/add")
    Result<Boolean> add(@Valid @RequestBody MonitorWoAddDTO dto);

    //(value = "修改")
    @PostMapping("/edit")
    Result<Boolean> edit(@Valid @RequestBody MonitorWoEditDTO dto);

    //(value = "删除")
    @PostMapping("/delete")
    Result<Boolean> delete(@Valid @RequestBody MonitorWoDeleteDTO dto);

    //(value = "导出数据量查询")
    @PostMapping("/exportCount")
    Result<Integer> exportCount(@Valid @RequestBody MonitorWoExcelDTO dto);

//    @ApiOperation(value = "导出接口")
    @PostMapping("/export")
    Result<Page<MonitorWoExcelVO>> export(@Valid @RequestBody MonitorWoExcelDTO dto);


    @PostMapping("/sendMqMessage")
    Result<Boolean> sendMqMessage(@Valid @RequestBody List<MonitorWoAddDTO> list);

}
